A computer system comprises a large number of independent variables. A variable can represent an arbitrary data structure. It can be as simple as memory location content, or as complex as the representation of a device. Variables are identified by a name, which is a label containing a reference. This label allows both human users and program to identify the variable and locate its value in the system. The value of a variable is dictated by the content of the data structure it represents. It can be as simple as a single boolean or can be a long series of bytes. The name-value pair that identifies a variable at any given time t is noted (N(t), V(t)). Variables are said to be independent if they cannot be algorithmically derived from other variables.
A user or program performing some work on the computer system is constantly changing a large number of variables. Among these variables, a small subset of independent variables, called the variable working set (VWS), is of particular interest because it is sufficient to describe the state of the system at a certain point in time for the user's purpose. For example, if a user is working on the storage subsystem, his variable working set could be the set of currently available storage devices, their access modes and their mount points. This information would be sufficient for the user to recreate the configuration of the storage subsystem in which he is interested. Variables can be added to or removed from the working set, and the value of variables can change. At any given point in time, the variable working set S(t) is composed of a set of k pairs of variable names and values S(t)={(N1(t), V1(t)), (N2(t), V2(t)), . . . , (Nk(t), Vk(t))}.
This set of variables can be extracted from the current state of the running system and stored. This extraction can either be automatic or performed through well-chosen system commands. It can happen either by examining the current state, or by examining the commands that change this state. The operation that obtains the value of a variable is said to be the “getter” of the variable. Conversely, the operation that allocates a new value to the variable is said to be the “setter” of the variable. The state of the system is affected by its initial configuration, generally stored as files in non-volatile memory or disks. The system, when it initializes, reads the set C of initial configuration files and brings up the computer to a certain initial state S(0). After initialization, a set P of setter programs can be run automatically to bring the system back to the desired state S. A system state S is said to be automatically reachable if there exist a set C of configuration files and a set P of programs such that state S can be attained by the system by initializing on configuration set C and then running program set P.
A user can easily bring the system to an undesirable state, either by mistake or because of a program error. The user will then want to bring the system back to a known-good state, either by issuing command to change variables, or by reinitializing the system. This recovery process is error-prone and tedious if done manually. Unless he is very careful, the user will have to spend a lot of time to recreate the known-good state from which he can resume useful work.
A popular existing solution for this problem is to run virtualized system, also referred to as virtual machines. Virtualizers such as EMC Corporation's VMW allow the user to take “snapshots” of the system status by storing in a large file the current content of the virtual machine's memory, and then restore the whole system state by reloading the snapshot. However, only a few limited hardware architectures can benefit from this system. In addition, snapshots take considerable amount of time and storage for execution. Virtualizers have well-known benefits as well as performance trade-offs that may not be acceptable in some environments. Virtual machines are therefore not always desirable or achievable. Accordingly, a simpler, faster way to restore a configuration—for instance, when only a limited set of state variables are to be restored—is desirable.
Another popular solution is to have system administrators create ad-hoc startup scripts to bring the system into the desirable state. However, this is a manual, error-prone, time-consuming approach. Accordingly, it is also desirable to have systematic, automatable method to recreate a given state on a machine.